package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CharactersMapper;
import com.ruoyi.system.domain.vo.Characters;
import com.ruoyi.system.service.ICharactersService;

/**
 * 角色Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-25
 */
@Service
public class CharactersServiceImpl implements ICharactersService
{
    @Autowired
    private CharactersMapper charactersMapper;

    /**
     * 查询角色
     *
     * @param charactersId 角色主键
     * @return 角色
     */
    @Override
    public Characters selectCharactersByCharactersId(Long charactersId)
    {
        return charactersMapper.selectCharactersByCharactersId(charactersId);
    }

    /**
     * 查询角色列表
     *
     * @param characters 角色
     * @return 角色
     */
    @Override
    public List<Characters> selectCharactersList(Characters characters)
    {
        return charactersMapper.selectCharactersList(characters);
    }

    /**
     * 新增角色
     *
     * @param characters 角色
     * @return 结果
     */
    @Override
    public int insertCharacters(Characters characters)
    {
        return charactersMapper.insertCharacters(characters);
    }

    /**
     * 修改角色
     *
     * @param characters 角色
     * @return 结果
     */
    @Override
    public int updateCharacters(Characters characters)
    {
        return charactersMapper.updateCharacters(characters);
    }

    @Override
    public int deleteCharactersByCharactersIds(Long charactersId) {
        return charactersMapper.deleteCharactersByCharactersIds(charactersId);
    }

    /**
     * 批量删除角色
     *
     * @param charactersIds 需要删除的角色主键
     * @return 结果
     */


    /**
     * 删除角色信息
     *
     * @param charactersId 角色主键
     * @return 结果
     */
    @Override
    public int deleteCharactersByCharactersId(Long charactersId)
    {
        return charactersMapper.deleteCharactersByCharactersId(charactersId);
    }
}